<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
  <head>
    <%@include file="../common.jsp"%>
    <title>词典管理</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">  
	<link rel="stylesheet" type="text/css" href="resources/css/common.css">
	<script type="text/javascript" src="resources/js/framejs/jquery.form.js"></script>
	<script type="text/javascript" src="resources/js/dict/dict.js"></script>  
  </head>
  <body>
   	<div class="content">
   		<h4>词典管理</h4>
   		<hr/>
   		<!-- 查询面板 -->
   	 	<div class="panel panel-default">
		    <div class="panel-heading">
		      <h4 class="panel-title">
		        <a data-toggle="collapse" data-parent="#accordion" href="#collapseSearch">
		           	<i class="icon icon-search" ></i> 查询过滤
		        </a>
		      </h4>
		    </div>
		    <div id="collapseSearch" class="panel-collapse collapse out">
		      <div class="panel-body">
				  <form id="form_search" class="form-horizontal">
			        <div class="form-group">
			          	<label class="col-md-1 control-label">词条</label>
			          	<div class="col-md-4">
			             	<input type="text"   id="search_byName" class="form-control" placeholder="模糊查询...">
			          	</div>
			          	<label class="col-md-1 control-label">翻译类型</label>
			          	<div class="col-md-4">
			             	<select  id = "search_dictType" class="form-control"  placeholder="选择翻译类型" data-toggle="tooltip" data-placement="top" >
			             	  <option  value="0" selected>请选择翻译类型…</option>
			             	   <option  value="1">中译英</option>
			             	   <option value="2">英译中</option>
			             	</select>
			          	</div>
			        </div>
			        <div class="form-group">
				         <label class="col-md-1 control-label">开始时间</label>
				          <div class="col-md-4" >
				          		<input type ="date"  class="form-control"  name="startTime" > 
				          </div>
				           <label class="col-md-1 control-label">结束时间</label>
				          <div class="col-md-4" >
                                <input type ="date"  class="form-control"  name="endTime">
				          </div>
			        </div>
			        <div class="form-group">
			          <div class="col-md-offset-1 col-md-11">
			             <button id="btn_search" class="btn btn-default"><i class="icon icon-search"></i> 查询</button>
			             <button id="btn_reset" class="btn btn-default"><i class="icon icon-undo"></i> 重置</button>
			          </div>
			        </div>
			      </form>
		      </div>
		    </div>
		</div>
		
	    <!-- 工具栏 -->
   		<div class="tools"> 
   		   		 <button id="btn_add" type="button" class="btn btn-primary"><i class="icon icon-plus-sign"></i>  增加</button>
	    		<button id="btn_edit" type="button"  class="btn btn-primary"><i class="icon icon-edit"></i>  修改</button>
		    	<button id="btn_del" type="button"  class="btn btn-warning"><i class="icon icon-minus-sign"></i>  删除</button>
	    		<button id="btn_myFile" type="button"  class="btn btn-primary"><i class="icon  icon-user"></i>  我的词条</button>
	    		<button id="btn_refresh" type="button"  class="btn btn-primary"><i class="icon  icon-spin icon-refresh"></i> 刷新</button>	
	    </div>
	    <!-- 列表 -->
	    <table id="tab_list" class="table table-hover table-striped mytable">
			<thead>
				<tr>
					<th style="width: 2%;"><input id="pkall" type='checkbox' class='checkbox'></th>
					<th style="width: 8%;">序号</th>
					<th style="width: 20%;">词条</th>
					<th style="width: 10%;">翻译类型</th>
					<th style="width: 20%;">词义</th>
					<th style="width: 30%;">解释</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
	  	</table>
	  	<!-- 分页信息条 -->
	  	<div id="pagebar" class="pagebar">
		  	<ul class="pager">
			</ul>
			<p id="page_info" class="page_info">显示第<span>0</span>到第<span>0</span>条记录,共<span>0</span>条</p>
	  	</div>  
	  	
	  	<!-- 添加 -->
		 <div class="modal fade bs-example-modal-lg" id="modal_add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		  <div class="modal-dialog modal-lg">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		        <h4 class="modal-title" id="myModalLabel">添加词条</h4>
		      </div>
		      <div class="modal-body">
		         <form id="form_add" class="form-horizontal" role="form">
				  	  <div class="form-group">
						  <label class="col-sm-2 control-label required">词条</label>
						  <div class="col-sm-4">
						     <input type="text" name="byName" placeholder="80字以内" class="form-control" data-toggle="tooltip" data-placement="top"  title="请输入词条" >
						  </div>
						  <label class="col-sm-2 control-label ">词义</label>
						  <div class="col-sm-4">
						     <input type="text" name="toName" placeholder="80字以内" class="form-control" data-toggle="tooltip" data-placement="top"  title="请输入词义" >
						</div>
					  </div>
					  								  				
					  <div class="form-group">
							<label class="col-sm-2 control-label ">解释</label>
						  <div class="col-sm-10">
						 	<textarea  name="translate" cols="100" rows="3" style="width:100%;height:200px;"  placeholder="150字以内,请按回车键换行" class="form-control" data-toggle="tooltip" data-placement="top" title="请输入解释" ></textarea>
						  </div>		
						</div>
						
				  <div class="form-group" style="display:none" id="same_dict_div">	
				     <label class="col-sm-2 control-label ">存在相同词条</label>
					  <div class="col-sm-10">
					      <table  class="table table-bordered table-hover"  id = "same_dict_table">
					      <thead><th>词义</th><th>释义</th></thead>
						      <tbody>
						      </tbody>
						     </table>
					     </div>
					  </div>
					  											
				</form>
		      </div>
		      <div class="modal-footer">
					<button id="btn_confirm_add" type="button" class="btn btn-primary">确定</button>
		      </div>
		    </div>
	   </div>
	</div>	
	<!-- 修改 -->
		 <div class="modal fade bs-example-modal-lg" id="modal_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		  <div class="modal-dialog modal-lg">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		        <h4 class="modal-title" id="myModalLabel">修改词条</h4>
		      </div>
		      <div class="modal-body">
		         <form id="form_edit" class="form-horizontal" role="form">
		         <input type ="hidden" name="dictId">
				  	  <div class="form-group">
						  <label class="col-sm-2 control-label required">词条</label>
						  <div class="col-sm-4">
						     <input type="text" name="edit_byName" placeholder="80字以内" class="form-control" data-toggle="tooltip" data-placement="top" title="请输入词条" >
						  </div>
						  <label class="col-sm-2 control-label ">词义</label>
						  <div class="col-sm-4">
						     <textarea  cols="25" rows="3"   name="edit_toName" placeholder="80字以内" class="form-control" data-toggle="tooltip" data-placement="top" title="请输入词义" ></textarea>
						</div>
					  </div>
					  					 						
					  <div class="form-group">
							<label class="col-sm-2 control-label ">解释</label>
						  <div class="col-sm-10">
						 	<textarea  name="edit_translate" cols="100" rows="3" style="width:100%;height:200px;"  placeholder="150字以内,请按回车键换行" class="form-control" data-toggle="tooltip" data-placement="top" title="请输入解释" ></textarea>
						  </div>		
						</div>
				</form>
		      </div>
		      <div class="modal-footer">
					<button id="btn_confirm_edit" type="button" class="btn btn-primary">确定</button>
		      </div>
		    </div>
	   </div>
	</div>	
	
 </div>
  </body>
</html>